package com.cangmaomao.m_penManage.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.clj.fastble.data.BleDevice;


public class BleDeviceData implements Parcelable {

    private boolean flag;

    private BleDevice bleDevice;
    private boolean isOften;
    private boolean isSelect;
    private String newsName;


    public BleDeviceData(boolean flag, BleDevice bleDevice) {
        this.flag = flag;
        this.bleDevice = bleDevice;
    }


    protected BleDeviceData(Parcel in) {
        flag = in.readByte() != 0;
        bleDevice = in.readParcelable(BleDevice.class.getClassLoader());
    }

    public static final Creator<BleDeviceData> CREATOR = new Creator<BleDeviceData>() {
        @Override
        public BleDeviceData createFromParcel(Parcel in) {
            return new BleDeviceData(in);
        }

        @Override
        public BleDeviceData[] newArray(int size) {
            return new BleDeviceData[size];
        }
    };


    public String getNewsName() {
        return newsName;
    }

    public void setNewsName(String newsName) {
        this.newsName = newsName;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public BleDevice getBleDevice() {
        return bleDevice;
    }

    public boolean isOften() {
        return isOften;
    }

    public void setOften(boolean often) {
        isOften = often;
    }

    public boolean isSelect() {
        return isSelect;
    }

    public void setSelect(boolean select) {
        isSelect = select;
    }

    public void setBleDevice(BleDevice bleDevice) {
        this.bleDevice = bleDevice;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(bleDevice, flags);
    }


}
